﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using YArchitech.LIB;

namespace YArchitech.HVAC
{
	public partial class NewParallelPipe : System.Windows.Forms.Form
	{
		public NewParallelPipe(List<string> listPipeSystemType)
		{
			this.listPipingSystem = listPipeSystemType;
			this.InitializeComponent();
			base.Icon = Resource.YArchitechIcon;
		}

		public NewParallelPipe()
		{
			this.InitializeComponent();
		}

		private void NewParallelPipe_Load(object sender, EventArgs e)
		{
			this.listBox1.DataSource = this.listPipingSystem;
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			this.lstselectedPs = new List<string>();
			foreach (object obj in this.listBox1.SelectedItems)
			{
				this.lstselectedPs.Add(obj.ToString());
			}
			base.DialogResult = DialogResult.OK;
			base.Close();
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
			base.Close();
		}

		private void listBox1_DoubleClick(object sender, EventArgs e)
		{
			this.btnOK_Click(null, null);
		}

		private List<string> listPipingSystem = new List<string>();

		public List<string> lstselectedPs;
	}
}
